package com.yazi.mxz.common.entity.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * GoodsReportId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class GoodsReportId implements java.io.Serializable {

	// Fields

	private Long goodsId;
	private Long memberId;
	private Long storeId;
	private Long companyId;
	private Long dateTime;
	private Integer timeType;
	private Byte belongType;
	private Double revenue;
	private Double cost;
	private Double loss;

	// Constructors

	/** default constructor */
	public GoodsReportId() {
	}

	/** minimal constructor */
	public GoodsReportId(Integer timeType) {
		this.timeType = timeType;
	}

	/** full constructor */
	public GoodsReportId(Long goodsId, Long memberId, Long storeId, Long companyId, Long dateTime,
			Integer timeType, Byte belongType, Double revenue, Double cost, Double loss) {
		this.goodsId = goodsId;
		this.memberId = memberId;
		this.storeId = storeId;
		this.companyId = companyId;
		this.dateTime = dateTime;
		this.timeType = timeType;
		this.belongType = belongType;
		this.revenue = revenue;
		this.cost = cost;
		this.loss = loss;
	}

	// Property accessors

	@Column(name = "GOODS_ID", precision = 15, scale = 0)
	public Long getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	@Column(name = "MEMBER_ID", precision = 15, scale = 0)
	public Long getMemberId() {
		return this.memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	@Column(name = "STORE_ID", precision = 15, scale = 0)
	public Long getStoreId() {
		return this.storeId;
	}

	public void setStoreId(Long storeId) {
		this.storeId = storeId;
	}

	@Column(name = "COMPANY_ID", precision = 15, scale = 0)
	public Long getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	@Column(name = "DATE_TIME", precision = 15, scale = 0)
	public Long getDateTime() {
		return this.dateTime;
	}

	public void setDateTime(Long dateTime) {
		this.dateTime = dateTime;
	}

	@Column(name = "TIME_TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getTimeType() {
		return this.timeType;
	}

	public void setTimeType(Integer timeType) {
		this.timeType = timeType;
	}

	@Column(name = "BELONG_TYPE", precision = 2, scale = 0)
	public Byte getBelongType() {
		return this.belongType;
	}

	public void setBelongType(Byte belongType) {
		this.belongType = belongType;
	}

	@Column(name = "REVENUE", precision = 8)
	public Double getRevenue() {
		return this.revenue;
	}

	public void setRevenue(Double revenue) {
		this.revenue = revenue;
	}

	@Column(name = "COST", precision = 8)
	public Double getCost() {
		return this.cost;
	}

	public void setCost(Double cost) {
		this.cost = cost;
	}

	@Column(name = "LOSS", precision = 8)
	public Double getLoss() {
		return this.loss;
	}

	public void setLoss(Double loss) {
		this.loss = loss;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof GoodsReportId))
			return false;
		GoodsReportId castOther = (GoodsReportId) other;

		return ((this.getGoodsId() == castOther.getGoodsId()) || (this.getGoodsId() != null
				&& castOther.getGoodsId() != null && this.getGoodsId().equals(
				castOther.getGoodsId())))
				&& ((this.getMemberId() == castOther.getMemberId()) || (this.getMemberId() != null
						&& castOther.getMemberId() != null && this.getMemberId().equals(
						castOther.getMemberId())))
				&& ((this.getStoreId() == castOther.getStoreId()) || (this.getStoreId() != null
						&& castOther.getStoreId() != null && this.getStoreId().equals(
						castOther.getStoreId())))
				&& ((this.getCompanyId() == castOther.getCompanyId()) || (this.getCompanyId() != null
						&& castOther.getCompanyId() != null && this.getCompanyId().equals(
						castOther.getCompanyId())))
				&& ((this.getDateTime() == castOther.getDateTime()) || (this.getDateTime() != null
						&& castOther.getDateTime() != null && this.getDateTime().equals(
						castOther.getDateTime())))
				&& ((this.getTimeType() == castOther.getTimeType()) || (this.getTimeType() != null
						&& castOther.getTimeType() != null && this.getTimeType().equals(
						castOther.getTimeType())))
				&& ((this.getBelongType() == castOther.getBelongType()) || (this.getBelongType() != null
						&& castOther.getBelongType() != null && this.getBelongType().equals(
						castOther.getBelongType())))
				&& ((this.getRevenue() == castOther.getRevenue()) || (this.getRevenue() != null
						&& castOther.getRevenue() != null && this.getRevenue().equals(
						castOther.getRevenue())))
				&& ((this.getCost() == castOther.getCost()) || (this.getCost() != null
						&& castOther.getCost() != null && this.getCost()
						.equals(castOther.getCost())))
				&& ((this.getLoss() == castOther.getLoss()) || (this.getLoss() != null
						&& castOther.getLoss() != null && this.getLoss()
						.equals(castOther.getLoss())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getGoodsId() == null ? 0 : this.getGoodsId().hashCode());
		result = 37 * result + (getMemberId() == null ? 0 : this.getMemberId().hashCode());
		result = 37 * result + (getStoreId() == null ? 0 : this.getStoreId().hashCode());
		result = 37 * result + (getCompanyId() == null ? 0 : this.getCompanyId().hashCode());
		result = 37 * result + (getDateTime() == null ? 0 : this.getDateTime().hashCode());
		result = 37 * result + (getTimeType() == null ? 0 : this.getTimeType().hashCode());
		result = 37 * result + (getBelongType() == null ? 0 : this.getBelongType().hashCode());
		result = 37 * result + (getRevenue() == null ? 0 : this.getRevenue().hashCode());
		result = 37 * result + (getCost() == null ? 0 : this.getCost().hashCode());
		result = 37 * result + (getLoss() == null ? 0 : this.getLoss().hashCode());
		return result;
	}

}